package org.findbugs.report.entity;

import java.util.List;

import org.dom4j.Document;

public class BugCollection {

    private Project project;
    private List<Bug> bugs;
    private Summary summary;

    public static BugCollection getBugCollection(Document findbugsDocument) {
        BugCollection bugCollection = new BugCollection();
        bugCollection.setProject(Project.getProject(findbugsDocument));
        bugCollection.setSummary(Summary.getSummary(findbugsDocument));
        bugCollection.setBugs(Bug.getBugs(findbugsDocument));
        
        return bugCollection;
    }
    
    public Project getProject() {
        return project;
    }

    public List<Bug> getBugs() {
        return bugs;
    }

    public Summary getSummary() {
        return summary;
    }

    public void setProject(Project project) {
        this.project = project;
    }

    public void setBugs(List<Bug> bugs) {
        this.bugs = bugs;
    }

    public void setSummary(Summary summary) {
        this.summary = summary;
    }

}
